include:
  - app.jobseekers.local-core

Check out Homepage Code:
  svn.latest:
    - name: svn://svn-pg.jobstreet.com/JobSeekers/trunk/homepage
    - target: /tmp/svn/JobSeekers/homepage
    - user: lighttpd
    - username: ciuser
    - password: automation
    - unless: test -d /var/www/seekasia.com/JobSeekers/homepage

Checkout local dev Sub SVN Module for Homepage:
  svn.latest:
    - name: svn://svn-pg.jobstreet.com/JobSeekers/trunk/job-search/Model/JobSearch
    - target: /tmp/svn/JobSeekers/homepage/Model/JobSearch
    - user: lighttpd
    - username: ciuser
    - password: automation
    - unless: test -d /var/www/seekasia.com/JobSeekers/homepage

Copy local dev Homepage Code to destination:
  cmd.run:
    - name: cp -r /tmp/svn/JobSeekers/homepage /var/www/seekasia.com/JobSeekers/
    - unless: test -d /var/www/seekasia.com/JobSeekers/homepage

Setup local dev Homepage Config:
  cmd.run:
    - name: ant -Dconfig.env=localdev setup_config replace_live_domains generate_homepage_html
    - cwd: /var/www/seekasia.com/JobSeekers/homepage

Setup local dev Homepage Controller Symlink:
  file.symlink:
    - name: /var/www/html/homepage
    - target: /var/www/seekasia.com/JobSeekers/homepage/Controller

Setup local dev Homepage Static Symlink:
  file.symlink:
    - name: /var/www/html/homepage-static
    - target: /var/www/seekasia.com/JobSeekers/homepage/Static
